package com.example.demo;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class BeanText {
    @Bean
    public User user1(){
        User user = new User();
        user.setName("hahaha");
        user.setAge(12);
        return user;
    }
    @Bean
    public User user2(){
        User user = new User();
        user.setName("ziiziz");
        user.setAge(12);
        return user;
    }
}
